package offer;

class Solution {
    public  static int findRepeatNumber(int[] nums) {
        int [] arr = new int[nums.length];
        for(int i = 0; i <nums.length;i++){
            arr[nums[i]]++;
            if(arr[nums[i]]>1)
                return nums[i];
        }
        return -1;
    }

    public static void main(String[] args) {
        int []nums = {2, 3, 1, 0, 2, 5, 3};

        int i = findRepeatNumber(nums);
    }

}

